<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>订单详情</title>
    <#-- 通用样式-->
    <#include "../common/head.ftl">

</head>
<body>

<div id="wrapper" class="toggled">

    <#--边栏sidebar-->
    <#include "../common/nav.ftl">

    <#--主要内容content-->
    <div id="page-content-wrapper">
        <div class="container-fluid">
            <div class="row clearfix">
                <div class="col-md-5 column">
                    <table class="table table-bordered table-condensed">
                        <thead>
                        <tr>
                            <th>订单id</th>
                            <th>订单总金额</th>
                            <th>订单状态</th>
                            <th>支付状态</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td>${orderDto.id}</td>
                            <td>${orderDto.amount}</td>
                            <td>${orderDto.orderStatusEnum.getMessage()}</td>
                            <td>${orderDto.payStatusEnum.getMessage()}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>

                <!--  订单商品列表  -->
                <div class="col-md-10 column">
                    <table class="table table-bordered table-condensed">
                        <thead>
                        <tr>
                            <th>商品id</th>
                            <th>商品名称</th>
                            <th>价格</th>
                            <th>数量</th>
                            <th>总额</th>
                        </tr>
                        </thead>
                        <tbody>
                <#list orderDto.orderDetailList as orderDetail>
                <tr>
                    <td>${orderDetail.productId}</td>
                    <td>${orderDetail.productName}</td>
                    <td>${orderDetail.productPrice}</td>
                    <td>${orderDetail.productQuantity}</td>
                    <td>${orderDetail.productQuantity * orderDetail.productPrice}</td>
                </tr>
                </#list>
                        </tbody>
                    </table>
                </div>

            <#--操作-->
                <div class="col-md-12 column">
            <#if orderDto.getOrderStatusEnum().message == "新订单">
                <a href="/seller/order/finish?id=${orderDto.id}" type="button"
                   class="btn btn-default btn-primary">完结订单</a>
                <a href="/seller/order/cancel?id=${orderDto.id}" type="button"
                   class="btn btn-default btn-danger">取消订单</a>
            </#if>
                </div>
            </div>
        </div>
    </div>

</div>
</div>

</body>
</html>